package kr.hkit.powerjava.chapter14;

import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.HeadlessException;

import javax.swing.JFrame;

class MyFrame extends JFrame{

	public MyFrame(String title) throws HeadlessException {
		super(title);
		init();
	}

	private void init() {
		setSize(450, 300);
		setLayout(new BorderLayout(30, 30));
		add(new Button("Center"), BorderLayout.CENTER);
		add(new Button("Page Start"), BorderLayout.NORTH);
		add(new Button("PageEnd"), BorderLayout.SOUTH);
		add(new Button("LineStart"), BorderLayout.LINE_START);
		add(new Button("LineEnd"), BorderLayout.LINE_END);
		
		setVisible(true);
	}
	
}

public class BorderLayoutEx {

	public static void main(String[] args) {
		new MyFrame("Border Layout 예제");
	}
}
